package com.dnw.request;

import com.google.common.collect.Maps;
import com.google.gson.Gson;

import java.util.Map;


/**
 * @author ChayChan
 * @description: TODO
 * @date 2017/7/6  15:03
 */

public class FunnysRequest {

    public FunnysRequest(String type, String pageOn, String pageSize, String searchKey) {
        this.type = type;
        this.pageOn = pageOn;
        this.pageSize = pageSize;
        this.searchKey = searchKey;
    }

    public String type;
    public String pageOn;
    public  String pageSize;
    public  String searchKey;

    @Override
    public String toString() {
        return new Gson().toJson(this);
    }

    public Map<String, String> params(){
        Map<String, String> map = Maps.newHashMap();
        map.put("type",type);
        map.put("pageOn",pageOn);
        map.put("pageSize",pageSize);
        map.put("searchKey",searchKey);
        return map;
    }
}
